﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bussiness;

namespace WebApplication
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
            IUnitOfWork iuntfwork = new EFUnitOfWork();
            KHACHHANGRepository repository = new KHACHHANGRepository(new EFRepository<KHACHHANG>(), iuntfwork);
            IQueryable<KHACHHANG> pobjkh = repository.All();
            ddlCarrierSelector.DataSource = pobjkh;
            ddlCarrierSelector.DataValueField = "MAKH";
            ddlCarrierSelector.DataTextField = "TENKH";
            ddlCarrierSelector.DataBind();
            }
        }

        protected void ddlCarrierSelector_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}